<?php

namespace App\Containers\AppSection\Profile\Actions;

use App\Containers\AppSection\Profile\Tasks\GetAllProfilesTask;
use App\Containers\AppSection\Profile\UI\API\Requests\GetOwnProfilesRequest;
use App\Ship\Parents\Actions\Action;
use Auth;

class GetOwnProfilesAction extends Action
{
    public function run(GetOwnProfilesRequest $request)
    {
        return app(GetAllProfilesTask::class)->addRequestCriteria()->thisUser(Auth::id())->run();
    }
}
